package com.unism.util;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class ResponseByJson implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2016012512370000L;
	
	private boolean status;
	private String message;
	private Object result;
    
	public ResponseByJson(boolean status, String message, Object object1) {
		
		super();
		this.status = status;
		this.message = message;
		if (null != object1) {
			this.result = object1;
		} else {
			this.result = new Object();
		}
	}

	public ResponseByJson() {
		// TODO Auto-generated constructor stub
	}

	public String toJsonString() {
		String result = "";
		try {
			result = JsonUtil.convertVO2String(this);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return result;
	}

	

	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getResult() {
		return result;
	}

	public void setResult(Object result) {
		this.result = result;
	}

}
